﻿Imports System.Windows.Forms

Public Class ProjectFolderContextMenu
    Inherits ContextMenuStrip

    Public Sub New()
        Items.Add("Add New File", Nothing, AddressOf AddNewFile)
        Items.Add("-")
        Items.Add("Open Path", Nothing, AddressOf OpenPath)
        Items.Add("Refresh Directories", Nothing, AddressOf RefreshDirectories)
    End Sub

    Public Property ClickedProjectFolder As Project.ProjectFolder

    Private Sub AddNewFile(ByVal sender As Object, ByVal e As EventArgs)
        ProjectNewFileDialog.ShowDialog()
    End Sub

    Private Sub OpenPath(ByVal sender As Object, ByVal e As EventArgs)
        ClickedProjectFolder.OpenPath()
    End Sub

    Private Sub RefreshDirectories(ByVal sender As Object, ByVal e As EventArgs)
        Globals.CurrentProject.FileList.RefreshDirectories()
    End Sub

End Class
